import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'

Vue.use(VueRouter);

const routes = [
    //  默认首页
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/Home.vue')
  },
    //  首页
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/Home.vue')
  },
    //  目的地
    {
    path: '/destination',
    name: 'Destination',
    component: () => import('../views/Destination.vue')
  },
    //  发现
    {
    path: '/discover',
    name: 'Discover',
    component: () => import('../views/Discover.vue'),
  },
    // 行程
    {
    path: '/journey',
    name: 'Journey',
    component: () => import('../views/Journey.vue')
  },
    // 行程
    {
    path: '/details',
    name: 'Details',
    component: () => import('../views/Details.vue')
  },
    // 购物车
    {
        path: '/shopping',
        name: 'Shopping',
        component: () => import('../views/Shopping.vue')
    },
    // 付款成功
    {
        path: '/pay',
        name: 'Pay',
        component: () => import('../views/Pay.vue')
    },
    // 详情页

    //  我的
    {
    path: '/personal',
    name: 'Personal',
    component: () => import('../views/Personal.vue'),
  },
    //  登录
    {
        path: '/login',
        name: 'Login',
        component: () => import('../views/Login.vue')
    },
    //  注册
    {
        path: '/register',
        name: 'Register',
        component: () => import('../views/Register.vue')
    },
    //  我的订单
    {
        path: '/order',
        name: 'Order',
        component: () => import('../views/Order.vue'),
    },

];

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
});

export default router
